

* Table 1 (summary of redistribution preferences)

tab redpref3

* Table 2 (determinants of redistribution preferences)
* 3 main models with foreign population OECD

xtmelogit redpref1 c.incomedif c.incomedif#c.forpop forpop i.year if (brncntr==1) || country:
xtmelogit, or

* Country fixed effects

logit redpref1 c.incomedif c.incomedif#c.forpop age i.gender education i.religion i.union i.euroesec  ///
forpop socgdp i.year i.country if brncntr==1, or

* Without country fixed effects

xtmelogit redpref1 c.incomedif c.incomedif#c.forpop age i.gender education i.religion i.union i.euroesec ///
forpop socgdp i.year if (brncntr==1) || country:
xtmelogit, or

* Predicted probabilities for graphs, foreign population OECD

* Average forpop, incomedif =(p10 p25 p50 mean p75 p90 p95 p99)

margins, at(incomedif=(-2.5 -1.7 -0.6 0 0.9 2.9 5.2 9.2)) predict(mu fixedonly)
marginsplot, recast(line) recastci(rarea) title("") xtitle("Distance to Mean Income (10,000s PPP 2010 dollars)", ///
size(medsmall)) ytitle("Average Predicted Probability", size(medsmall)) legend(off) scheme(sj)
graph export graph05.pdf, replace

* High forpop=14.5, low forpop=6.4, incomedif =(p10 p25 p50 mean p75 p90 p95 p99)

margins, at(incomedif=(-2.5 -1.7 -0.6 0 0.9 2.9 5.2 9.2) forpop=(5.3 14.7)) predict(mu fixedonly)
marginsplot, recast(line) recastci(rarea) title("") xtitle("Distance to Mean Income (10,000s PPP 2010 dollars)", ///
size(medsmall)) ytitle("Average Predicted Probability", size(medsmall)) legend(off) scheme(sj) ///
text(.85 4.5 "Low Foreign-Born Population", place(e)) text(.45 -1 "High Foreign-Born Population", place(e))
graph export graph06.pdf, replace

* Predicted probabilities for Table 3

margins, at(incomedif=(-2.5 2.9) forpop=(5.3 14.7)) predict(mu fixedonly)
